package dominio;

import java.util.ArrayList;

/**
 * Created by Rafael Simon Garcia on 11/14/13.
 */
public class ReverseNodesOperator{
    public static void Operate(ArrayList<? super GraphElement> nodes){
        int length = nodes.size();
        Object temp;
        for ( int i = 0, j = length - 1 ; i < length / 2; i++, j-- ){
            temp = nodes.set(i, (GraphElement)nodes.get(j));
            nodes.set( j, (GraphElement)temp );
        }
    }
}